package Constroter;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import tag.DictShow;

public class DictServlet extends HttpServlet{
	private static final long serialVersionUID = 1L;

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String method = request.getParameter("method");
		request.setCharacterEncoding("utf-8");
		if ("dictByCode".equals(method)) {
			String code = request.getParameter("code");
			DictShow dict=new DictShow();
			dict.setSelectName("defaultValue");
			response.setContentType("text/html;utf-8");
			PrintWriter out=response.getWriter();
			out.write(dict.getDictTypeByCode(code));
		}
	}
}
